<!--
 * @Descripttion:
 * @Author: Cxy
 * @Date: 2022-12-29 16:44:07
 * @LastEditors: Cxy
 * @LastEditTime: 2024-08-26 17:02:14
 * @FilePath: \xy-admin\play\src\views\login\index.vue
-->
<script lang="ts" setup>
import login from './component/login.vue'
import reg from './component/reg.vue'
import leftSvg from './component/leftSvg.vue'
import logo from './component/logo.vue'
const selectIndex = ref(0)
const menus = ref<Component[]>([markRaw(login), markRaw(reg)])
</script>

<template>
  <div class="login">
    <leftSvg class="login-leftImg" />
    <div class="login-rightFromWrap">
      <div class="login-rightFrom">
        <logo class="login-logo" />
        <component :is="menus[selectIndex]" v-model:selectIndex="selectIndex" />
      </div>
    </div>
    <XySkinPeel />
    <XyI18n />
  </div>
</template>

<style lang="scss" scoped>
.login {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;

  .login-leftImg {
    width: pxToRem(600);
    height: 100%;
  }

  .login-rightFromWrap {
    width: 34%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;

    .login-rightFrom {
      width: pxToRem(330);

      .login-logo {
        width: 100%;
        height: pxToRem(50);
        margin-bottom: pxToRem(20);
      }
    }
  }

  .com-xySkinPeel,
  .com-xyI18n {
    position: absolute;
    top: pxToRem(15);
    right: pxToRem(56);
    font-size: pxToRem(20);
  }

  .com-xyI18n {
    right: pxToRem(24);
  }
}

@include media('smallScreen') {
  .login {
    justify-content: center;

    .login-leftImg {
      display: none;
    }

    .login-rightFromWrap {
      width: pxToRem(330);
    }
  }
}
</style>
